app.filter("falseFilter", [
  function() {
    return function(data) {
      var arr;
      arr = [];
      angular.forEach(data, function(d, k) {
        if (d.bool) {
          arr.push(d);
        }
      });
      return arr;
    };
  }
]);

app.filter('to_trusted', [
  '$sce', function($sce) {
    return function(content) {
      return $sce.trustAsHtml(content);
    };
  }
]);

app.filter("IMG", [
  '$rootScope', function($rootScope) {
    return function(type) {
      var img, theme;
      theme = $rootScope.ear.theme;
      img = "img/default/";
      switch (type) {
        case 1:
          img += "banner-moren.png";
          break;
        case 2:
          img += "default.png";
          break;
        case 3:
          img += "shebei.png";
          break;
        default:
          img += "banner-moren.png";
      }
      return img;
    };
  }
]);
